<div id="menubg">
<link type="text/css" rel="stylesheet" href="style/menu/style.css">
	<link rel="stylesheet" type="text/css" media="screen" href="style/menu/superfish.css">
	<script type="text/javascript" src="style/menu/jquery-1.js"></script>
    <script type="text/javascript" src="style/menu/custom.js"></script>
    <script type="text/javascript" src="style/menu/superfish.js"></script>
	<div id="wrap" class="bgheader2">
        <ul class="sf-js-enabled sf-shadow" id="topmenu">
        <?php 
        	$page = "";
	        	if (isset($_GET["page"])){
	        		$page = $_GET["page"];
	        	}
        ?>
	        <li <?php if ($page==""||$page=="index") echo 'class="active" '?>>
	        	<a href="index.php?page=index" class="sf-with-ul">Trang chủ<span class="sf-sub-indicator"> »</span></a>
	        </li>
	        <?php 
	        	$sql = "SELECT * FROM tb_menu where menu_status = 1";
	        	$query = mysql_query($sql);
	        	while ($menu = mysql_fetch_array($query)){
	        ?>	
	        	<li <?php if ($page==$menu["menu_id"]) echo 'class="active" '?>>
	        		<a href="<?php echo "$menu[menu_link]?page=".$menu["menu_id"]; ?>" class="sf-with-ul"><?php echo $menu["menu_name"];?> <span class="sf-sub-indicator"> »</span></a>  
	        		<ul style="display: none; visibility: hidden; left: 166px; width: 1000; background: none repeat scroll 0% 0% rgb(20, 74, 148);" class="sf-menu">		
	        		<?php 
	        			$sql_cate = "SELECT * FROM tb_category where menu_id = $menu[menu_id] and cate_parent_status = 0";
	        			$query_cate = mysql_query($sql_cate);
	        			while ($cate = mysql_fetch_array($query_cate)):
	        		?>
							<li>
								<a href="<?php echo $cate["cate_link"]?>?page=<?php echo $menu["menu_id"]; ?>&cate_father=<?php echo $cate["cate_id"]; ?>" target="" class="sf-with-ul"><?php echo $cate["cate_name"];?> <span class="sf-sub-indicator"> »</span></a>
								<ul style="display: none; visibility: hidden;">
		                            <?php 
		                            	$sql_cate_child = "SELECT * FROM tb_category where cate_parent_id = $cate[cate_id]";
			        					$query_cate_child = mysql_query($sql_cate_child);
			        					while ($cate_child = mysql_fetch_array($query_cate_child)):
		                            ?>
		                            	<li><a href="<?php echo $cate["cate_link"].'?cate_id='.$cate_child["cate_id"].'&page='.$menu["menu_id"];?>"><?php echo $cate_child["cate_name"]?></a></li>
		                            <?php 
		                            endwhile;
		                            ?>
                            	</ul>
                            </li>
	        		<?php
	        			endwhile;
	        		?> 
	        		</ul>
	        	</li>
	        <?php }
	        ?>
      </ul>
            <div class="moduletype2">
                <div class="moduletype2_bgheader"></div>
            </div>
    </div>
</div>
<div id="bong"></div>